package com.cskaoyan.mapper;

import com.cskaoyan.bean.CskaoyanmallRole;
import com.cskaoyan.bean.CskaoyanmallRoleExample;
import java.util.List;

import com.cskaoyan.bean.vo.RoleOptionsVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface CskaoyanmallRoleMapper {
    long countByExample(CskaoyanmallRoleExample example);

    int deleteByExample(CskaoyanmallRoleExample example);

    /**
     * delete by primary key
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * insert record to table
     * @param record the record
     * @return insert count
     */
    int insert(CskaoyanmallRole record);

    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    int insertSelective(CskaoyanmallRole record);

    List<CskaoyanmallRole> selectByExample(CskaoyanmallRoleExample example);

    /**
     * select by primary key
     * @param id primary key
     * @return object by primary key
     */
    CskaoyanmallRole selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") CskaoyanmallRole record, @Param("example") CskaoyanmallRoleExample example);

    int updateByExample(@Param("record") CskaoyanmallRole record, @Param("example") CskaoyanmallRoleExample example);

    /**
     * update record selective
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(CskaoyanmallRole record);

    /**
     * update record
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(CskaoyanmallRole record);

    List<RoleOptionsVo> selectRoleOptions();

    int insertWithNameAndDesc(CskaoyanmallRole role);


    Integer isExistByName(String name);

    int updateByRole(CskaoyanmallRole role);
}